﻿
namespace System.Management.HyperV.Model.Msvm.CIM
{
    public abstract class ManagedElement
    {
        internal protected dynamic _dmo;

        [Obsolete]
        protected ManagementObject WmiInstance;

        #region Constructor
        protected ManagedElement(ManagementObject wmiInstance)
        {
            this.WmiInstance = wmiInstance;
            this._dmo = new DynamicManagementObject(wmiInstance);
        }
        #endregion

        public string ElementName
        {
            get { return _dmo.ElementName as string; }
        }
        public string Description
        {
            get { return _dmo.Description as string; }
        }
        public string Caption
        {
            get { return _dmo.Caption as string; }
        }

        #region WMI Properties
        internal protected string __CLASS
        {
            get { return _dmo.__CLASS as string; }
        }
        internal protected string[] __DERIVATION
        {
            get { return _dmo.__DERIVATION as string[]; }
        }
        internal protected string __DYNASTY
        {
            get { return _dmo.__DYNASTY as string; }
        }
        internal protected int __GENUS
        {
            get { return (int)_dmo.__GENUS; }
        }
        internal protected string __NAMESPACE
        {
            get { return _dmo.__NAMESPACE as string; }
        }
        internal protected string __PATH
        {
            get { return _dmo.__PATH as string; }
        }
        internal protected int __PROPERTY_COUNT
        {
            get { return (int)_dmo.__PROPERTY_COUNT; }
        }
        internal protected string __RELPATH
        {
            get { return _dmo.__RELPATH as string; }
        }
        internal protected string __SERVER
        {
            get { return _dmo.__SERVER as string; }
        }
        internal protected string __SUPERCLASS
        {
            get { return _dmo.__SUPERCLASS as string; }
        }
        #endregion
    }
}
